home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / xview / genial / func / boxfunc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  661 b   |  47 lines

  1. /*
  2.  * boxfunc.c -- routines for drawing boxes
  3.  *
  4.  */
  5.  
  6. #include "ui.h"
  7. #include "display.h"
  8. #include "log.h"
  9. #include "reg.h"
  10.  
  11.  
  12. box_init()
  13. {
  14.   clear_info();
  15.   lab_info("Please select a box",1);
  16.   lab_info("Hit <eval> when finished",2);
  17.  
  18.   setrtype(BOX);
  19.  
  20.   return 0;
  21. }
  22.  
  23. box_eval()
  24. {
  25.   XPoint p1,p2;
  26.   static char l[80];
  27.  
  28.   p1.x=curfunc->reg->r_plist->pt.x;
  29.   p1.y=curfunc->reg->r_plist->pt.y;
  30.   p2.x=curfunc->reg->r_plist->next->pt.x;
  31.   p2.y=curfunc->reg->r_plist->next->pt.y;
  32.   sprintf(l,"Box selected from: (%d,%d) to (%d,%d)", p1.x,p1.y,p2.x,p2.y);
  33.   clear_info();
  34.   lab_info(l,1);
  35.   printf(l);
  36.   return 0;
  37. }
  38.  
  39. box_clear()
  40. {
  41.  
  42.   clear_info();
  43.  
  44.   return 0;
  45. }
  46.   
  47.